﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WxYygh.Common
{
    public class JsonValues
    {

        public JsonValues()
        {
            count = 0;
            code = 0;
            value = "";
            data = null;
            success = true;

        }

        /// <summary>
        /// 字符串数据值
        /// </summary>
        public string value { set; get; }
        public string value1 { set; get; }
        public string value2 { set; get; }

        /// <summary>
        /// 对象数据值
        /// </summary>
        public object data { set; get; }
        public object data1 { set; get; }
        public object data2 { set; get; }

        /// <summary>
        /// 是否成功/完成(false失败  true成功，默认为true)
        /// </summary>
        public bool success { get; set; }

        /// <summary>
        /// 返回状态码
        /// </summary>
        public int code { get; set; }

        /// <summary>
        /// 数据条数
        /// </summary>
        public int count { get; set; }

        /// <summary>
        /// 消息内容
        /// </summary>
        public string msg { set; get; }


        /// <summary>
        /// 转换为 Json
        /// </summary>
        /// <returns></returns>
        public string ToJson()
        {
            return JsonHelper.GetJson(this);
        }
    }
}
